package com.itheima.service.impl;

import com.itheima.dao.IUserDao;
import com.itheima.domain.Users;
import com.itheima.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements IUserService {
    @Autowired
    private IUserDao userDao;
    @Override
    public void register(Users users) {
        userDao.register(users);

    }

    @Override
    public Users login(String username, String password) {
       Users users =  userDao.login(username,password);
        return users;
    }
}
